
#ifndef  RECOVERY_LOG_ILOG_H
#define  RECOVERY_LOG_ILOG_H

#include <string>
#include "recovery/Common.h"

namespace recovery {
namespace log {

class ILog : public recovery::AbstractResource {
public:
    virtual ~ILog(){}

    virtual int size() const = 0;
    virtual int remove() = 0;;
    virtual int truncate(size_t size = 0) = 0;
    virtual int sync() = 0;

    virtual int append(const std::string & data) = 0;
    virtual int positionedRead(const size_t offset, uint8_t * buf, const int len) = 0;
};

} // end of namespace log
} // end of namespace recovery

#endif   /* RECOVERY_LOG_ILOG_H */
